package com.csdj.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.csdj.entity.Foodlist;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.csdj.service.impl.PageResponse;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zq
 * @since 2024-12-11
 */
public interface FoodlistMapper extends BaseMapper<Foodlist> {


    /*
     * @Author 周茜
     * @Date 2024-12-12 15:07
     * @Description 查询畅销前十
     * @Param []
     * @Return java.util.List<com.csdj.entity.Foodlist>
     * @Since version 1.0
     */
    public List<Foodlist> selectfoodlistBytop10();

    /*
     * @Author 周茜
     * @Date 2024-12-12 15:07
     * @Description 根据食品名称查询
     * @Param [name]
     * @Return com.csdj.entity.Foodlist
     * @Since version 1.0
     */
    public Foodlist selectfoodlistByName(String name);

    /*
     * @Author 周茜
     * @Date 2024-12-15 15:29
     * @Description 根据食品种类查询分页查询
     * @Param [page, categorytype]
     * @Return java.util.List<com.csdj.entity.Foodlist>
     * @Since version 1.0
     */
    public Page<Foodlist> selectfoodlistByCategory(Page<Foodlist> page,String categorytype);

    /*
     * @Author 周茜
     * @Date 2024-12-17 18:08
     * @Description
     * @Param [page, categorytype]
     * @Return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.csdj.entity.Foodlist>
     * @Since version 1.0
     */
    public Page<Foodlist> selectfoodlistDesc(Page<Foodlist> page);

    /*
     * @Author 周茜
     * @Date 2024-12-17 18:08
     * @Description
     * @Param [page, categorytype]
     * @Return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.csdj.entity.Foodlist>
     * @Since version 1.0
     */
    public Page<Foodlist> selectfoodlistAsc(Page<Foodlist> page);
    /*
     * @Author 周茜
     * @Date 2024-12-16 11:03
     * @Description 查询所有食品总数
     * @Param []
     * @Return int
     * @Since version 1.0
     */
    int selectCount();

}
